<?php

namespace App\Helpers;

/**
 * 返回码对应的返回信息
 * @author qfh
 */
class RestUtils
{

    public static function getStdObj()
    {
        return new \stdClass();
    }

    /**
     * 获取错误代码的错误信息
     */
    public static function getErrorMessage($code)
    {
        $codeMsg = [

            '2' => '您的账号在其他设备登录,请重新登录!',
            '1001' => 'Bill gagal dihapuskan, coba refresh ulang',
            '1002' => 'Bill gagal dihapuskan, coba refresh ulang',
            '1003' => '非法登录',
            '1004' => '还款失败',
            '1005' => '添加身份证失败',
            '1006' => '验证码错误，请重新验证',
            '1007' => '需要输入验证码',
            '1008' => 'Mohon dapatkan bill lagi',
            '1009' => 'Mohon dapatkan bill lagi',





            //用户管理
            '1101' => '用户名或密码错误',
            '1102' => '用户名或密码错误',
            '1103' => 'accessToken错误',
            '1104' => '用户已注册',
            '1105' => '用户注册成功',
            '1106' => '用户名不存在',
            '1107' => '您设置的新密码与原密码一致',
            '1108' => '密码修改成功',
            '1109' => '密码修改失败',
            '1110' => '等待退出',
            '1111' => '错误',
            '1112' => '请输入正确的手机号',
            '1113' => '请选择身份',
            '1114' => '绑定手机号失败',
            '1115' => '手机号已注册',
            '1116' => '用户错误',
            '1117' => '不能为空',
            '1118' => '不可重复提交',
            '1119' => '密码不能为空',
            '1120' => '抱歉，昵称已被占用...',
            '1121' => '修改手机号成功',
            '1122' => '修改手机号失败',
            '1123' => '1-20个字符，支持中英文、数字和特殊符号',
            '1124' => '手机号未注册',
            '1125' => '身份修改失败',
            '1126' => '没设置身份',
            '1127' => '该用户已经被冻结',
            '1128' => '修改清档日期失败',
            '1129' => '已经开启了常用设备保护',
            '1130' => '手机未通过验证',

            //限制IP和手机号请求次数
            '7109' => '操作过于频繁，请明天在尝试',

            //验证码相关
            '1200' => '短信验证码发送成功',
            '1201' => '在1分钟内不能重复获取验证码',
            '1202' => '请输入手机号码',
            '1203' => '短信验证码失效',
            '1204' => '短信验证码错误,请重新输入',
            '1205' => '短信验证码发送失败',
            '1206' => '请您前去登录',
            '1207' => '非法登陆，请您前去登陆',
            '1208' => '弹窗不存在',
            '1209' => '我知道了',


           //用户账单记录相关
            '2001' => 'Bill gagal ditambahkan, mohon refresh lagi',
            '2002' => 'Bill gagal diubah, coba refresh lagi',
            '2002' => 'Bill gagal diubah, coba refresh lagi',


            '3001' => 'Umpan balik gagal ditambahkan',

            '20001' => '用户已经注册',
            '20002' => '两次密码不一致',
            '20003' => '用户未注册',

            //关于用户的
            '20000' => '用户已注册,请前去登录',
            '20001' => '密码不一致,请重新设置',
            '20002' => '用户还未注册,请前去注册',
            '20004' => '抱歉，该身份证已经注册，详情联系客服！',
            '20005' => '非交易时间,请在00:00:00到22:30:00交易',
            '20006' => '抱歉,交易前请完成银联的开通!',
            '20007' => '两次密码不一致,请重新设置',
            '20008' => '新密码不能和旧密码一致',
            '20009' => '抱歉原密码输入错误!请重新输入!',
            '20010' => '网络异常,请稍后重试!',
            '20011' => '绑定失败，请删除该信用卡后绑定!',
            '20012' => '填写金额有误,请重新填写!',
            '20013' => '您好!该银行单笔限额是2000,请重新填写金额!',
            '20014' => '您好!该银行单笔限额是10000,请重新填写金额!',
            '20015' => '请完成实名认证!',
            '20016' => '您今天已经签到成功!',


            '30001' => '存币失败请联系客服',
            '30002' => '您有未处理的订单,请耐心等待',
            '30003' => '提币失败请联系客服',
            '30004' => '抱歉,兑换的以太坊不足!',
            '30005' => '抱歉,充币失败!',


        ];

        return isset($codeMsg[$code]) ? $codeMsg[$code] : '';
    }


}
